﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// abstract TinTucBinhLuan typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class TinTucBinhLuanDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<TinTucBinhLuanDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.TinTucBinhLuan _currentTinTucBinhLuan = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxTinTucBinhLuanDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxTinTucBinhLuanErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxTinTucBinhLuanBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the IDTinTucBinhLuan property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDTinTucBinhLuanDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDTinTuc property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDTinTucDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TenSuDung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTenSuDungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TenNguoiDung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTenNguoiDungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Email property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxEmailDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the NoiDung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNoiDungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemCapNhat property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemCapNhatDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.TinTuc> _IDTinTucList;
		
		/// <summary> 
		/// The list of selectable TinTuc
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.TinTuc> IDTinTucList
		{
			get {return this._IDTinTucList;}
			set 
			{
				this._IDTinTucList = value;
				this.uxIDTinTucDataGridViewColumn.DataSource = null;
				this.uxIDTinTucDataGridViewColumn.DataSource = this._IDTinTucList;
			}
		}
		
		private bool _allowNewItemInIDTinTucList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of TinTuc
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDTinTucList
		{
			get { return _allowNewItemInIDTinTucList;}
			set
			{
				this._allowNewItemInIDTinTucList = value;
				this.uxIDTinTucDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.TinTucBinhLuan> _TinTucBinhLuanList;
				
		/// <summary> 
		/// The list of TinTucBinhLuan to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.TinTucBinhLuan> TinTucBinhLuanList
		{
			get {return this._TinTucBinhLuanList;}
			set
			{
				this._TinTucBinhLuanList = value;
				this.uxTinTucBinhLuanBindingSource.DataSource = null;
				this.uxTinTucBinhLuanBindingSource.DataSource = value;
				this.uxTinTucBinhLuanDataGridView.DataSource = null;
				this.uxTinTucBinhLuanDataGridView.DataSource = this.uxTinTucBinhLuanBindingSource;				
				//this.uxTinTucBinhLuanBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxTinTucBinhLuanBindingSource_ListChanged);
				this.uxTinTucBinhLuanBindingSource.CurrentItemChanged += new System.EventHandler(OnTinTucBinhLuanBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnTinTucBinhLuanBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentTinTucBinhLuan = uxTinTucBinhLuanBindingSource.Current as Entities.TinTucBinhLuan;
			
			if (_currentTinTucBinhLuan != null)
			{
				_currentTinTucBinhLuan.Validate();
			}
			//_TinTucBinhLuan.Validate();
			OnCurrentEntityChanged();
		}

		//void uxTinTucBinhLuanBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.TinTucBinhLuan"/> instance.
		/// </summary>
		public Entities.TinTucBinhLuan SelectedTinTucBinhLuan
		{
			get {return this._currentTinTucBinhLuan;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxTinTucBinhLuanDataGridView.VirtualMode;}
			set
			{
				this.uxTinTucBinhLuanDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxTinTucBinhLuanDataGridView.AllowUserToAddRows;}
			set {this.uxTinTucBinhLuanDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxTinTucBinhLuanDataGridView.AllowUserToDeleteRows;}
			set {this.uxTinTucBinhLuanDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxTinTucBinhLuanDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxTinTucBinhLuanDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="TinTucBinhLuanDataGridViewBase"/> class.
		/// </summary>
		public TinTucBinhLuanDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxTinTucBinhLuanDataGridView = new System.Windows.Forms.DataGridView();
			this.uxTinTucBinhLuanBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxTinTucBinhLuanErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDTinTucBinhLuanDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDTinTucDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxTenSuDungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxTenNguoiDungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxEmailDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNoiDungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemCapNhatDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDTinTucBindingSource = new TinTucBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDTinTucBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucBinhLuanDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucBinhLuanBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucBinhLuanErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxTinTucBinhLuanErrorProvider
			// 
			this.uxTinTucBinhLuanErrorProvider.ContainerControl = this;
			this.uxTinTucBinhLuanErrorProvider.DataSource = this.uxTinTucBinhLuanBindingSource;						
			// 
			// uxTinTucBinhLuanDataGridView
			// 
			this.uxTinTucBinhLuanDataGridView.AutoGenerateColumns = false;
			this.uxTinTucBinhLuanDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxTinTucBinhLuanDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDTinTucBinhLuanDataGridViewColumn,
		this.uxIDTinTucDataGridViewColumn,
		this.uxTenSuDungDataGridViewColumn,
		this.uxTenNguoiDungDataGridViewColumn,
		this.uxEmailDataGridViewColumn,
		this.uxNoiDungDataGridViewColumn,
		this.uxThoiDiemCapNhatDataGridViewColumn			});
			this.uxTinTucBinhLuanDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxTinTucBinhLuanDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxTinTucBinhLuanDataGridView.Name = "uxTinTucBinhLuanDataGridView";
			this.uxTinTucBinhLuanDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxTinTucBinhLuanDataGridView.TabIndex = 0;	
			this.uxTinTucBinhLuanDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxTinTucBinhLuanDataGridView.EnableHeadersVisualStyles = false;
			this.uxTinTucBinhLuanDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnTinTucBinhLuanDataGridViewDataError);
			this.uxTinTucBinhLuanDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnTinTucBinhLuanDataGridViewCellValueNeeded);
			this.uxTinTucBinhLuanDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnTinTucBinhLuanDataGridViewCellValuePushed);
			
			//
			// uxIDTinTucBinhLuanDataGridViewColumn
			//
			this.uxIDTinTucBinhLuanDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDTinTucBinhLuanDataGridViewColumn.DataPropertyName = "IDTinTucBinhLuan";
			this.uxIDTinTucBinhLuanDataGridViewColumn.HeaderText = "IDTinTucBinhLuan";
			this.uxIDTinTucBinhLuanDataGridViewColumn.Name = "uxIDTinTucBinhLuanDataGridViewColumn";
			this.uxIDTinTucBinhLuanDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDTinTucBinhLuanDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDTinTucBinhLuanDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDTinTucDataGridViewColumn
			//
			this.uxIDTinTucDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDTinTucDataGridViewColumn.DataPropertyName = "IDTinTuc";
			this.uxIDTinTucDataGridViewColumn.HeaderText = "IDTinTuc";
			this.uxIDTinTucDataGridViewColumn.Name = "uxIDTinTucDataGridViewColumn";
			this.uxIDTinTucDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDTinTucDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDTinTucDataGridViewColumn.ReadOnly = false;		
			//
			// uxTenSuDungDataGridViewColumn
			//
			this.uxTenSuDungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTenSuDungDataGridViewColumn.DataPropertyName = "TenSuDung";
			this.uxTenSuDungDataGridViewColumn.HeaderText = "TenSuDung";
			this.uxTenSuDungDataGridViewColumn.Name = "uxTenSuDungDataGridViewColumn";
			this.uxTenSuDungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTenSuDungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTenSuDungDataGridViewColumn.ReadOnly = false;		
			//
			// uxTenNguoiDungDataGridViewColumn
			//
			this.uxTenNguoiDungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTenNguoiDungDataGridViewColumn.DataPropertyName = "TenNguoiDung";
			this.uxTenNguoiDungDataGridViewColumn.HeaderText = "TenNguoiDung";
			this.uxTenNguoiDungDataGridViewColumn.Name = "uxTenNguoiDungDataGridViewColumn";
			this.uxTenNguoiDungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTenNguoiDungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTenNguoiDungDataGridViewColumn.ReadOnly = false;		
			//
			// uxEmailDataGridViewColumn
			//
			this.uxEmailDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxEmailDataGridViewColumn.DataPropertyName = "Email";
			this.uxEmailDataGridViewColumn.HeaderText = "Email";
			this.uxEmailDataGridViewColumn.Name = "uxEmailDataGridViewColumn";
			this.uxEmailDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxEmailDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxEmailDataGridViewColumn.ReadOnly = false;		
			//
			// uxNoiDungDataGridViewColumn
			//
			this.uxNoiDungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNoiDungDataGridViewColumn.DataPropertyName = "NoiDung";
			this.uxNoiDungDataGridViewColumn.HeaderText = "NoiDung";
			this.uxNoiDungDataGridViewColumn.Name = "uxNoiDungDataGridViewColumn";
			this.uxNoiDungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNoiDungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNoiDungDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemCapNhatDataGridViewColumn
			//
			this.uxThoiDiemCapNhatDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemCapNhatDataGridViewColumn.DataPropertyName = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.HeaderText = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.Name = "uxThoiDiemCapNhatDataGridViewColumn";
			this.uxThoiDiemCapNhatDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemCapNhatDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemCapNhatDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDTinTucDataGridViewColumn
			//				
			this.uxIDTinTucDataGridViewColumn.DisplayMember = "IDTinTucDanhMuc";	
			this.uxIDTinTucDataGridViewColumn.ValueMember = "IDTinTuc";	
			this.uxIDTinTucDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDTinTucDataGridViewColumn.DataSource = uxIDTinTucBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxTinTucBinhLuanDataGridView);
			this.Name = "TinTucBinhLuanDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDTinTucBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucBinhLuanErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucBinhLuanDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucBinhLuanBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				TinTucBinhLuanDataGridViewEventArgs args = new TinTucBinhLuanDataGridViewEventArgs();
				args.TinTucBinhLuan = _currentTinTucBinhLuan;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class TinTucBinhLuanDataGridViewEventArgs : System.EventArgs
		{
			private Entities.TinTucBinhLuan	_TinTucBinhLuan;
	
			/// <summary>
			/// the  Entities.TinTucBinhLuan instance.
			/// </summary>
			public Entities.TinTucBinhLuan TinTucBinhLuan
			{
				get { return _TinTucBinhLuan; }
				set { _TinTucBinhLuan = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxTinTucBinhLuanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnTinTucBinhLuanDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxTinTucBinhLuanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnTinTucBinhLuanDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxTinTucBinhLuanDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDTinTucBinhLuanDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].IDTinTucBinhLuan;
						break;
					case "uxIDTinTucDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].IDTinTuc;
						break;
					case "uxTenSuDungDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].TenSuDung;
						break;
					case "uxTenNguoiDungDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].TenNguoiDung;
						break;
					case "uxEmailDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].Email;
						break;
					case "uxNoiDungDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].NoiDung;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						e.Value = TinTucBinhLuanList[e.RowIndex].ThoiDiemCapNhat;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxTinTucBinhLuanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnTinTucBinhLuanDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxTinTucBinhLuanDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDTinTucBinhLuanDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].IDTinTucBinhLuan = (System.Guid)e.Value;
						break;
					case "uxIDTinTucDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].IDTinTuc = (System.Guid)e.Value;
						break;
					case "uxTenSuDungDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].TenSuDung = (System.String)e.Value;
						break;
					case "uxTenNguoiDungDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].TenNguoiDung = (System.String)e.Value;
						break;
					case "uxEmailDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].Email = (System.String)e.Value;
						break;
					case "uxNoiDungDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].NoiDung = (System.String)e.Value;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						TinTucBinhLuanList[e.RowIndex].ThoiDiemCapNhat = (System.DateTime)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
